home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
docs
/
cptuts22
/
clock.cpp
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1992-01-20
|
447 b
|
28 lines
#include <stdio.h>
#include "clock.h"
clock::clock(void)
{
hour = 8;
minute = 51;
}
void clock::inc_and_print_time(void)
{
minute++; // Add one minute to the time
if (minute > 59) {
minute -= 60;
hour++;
}
// Output the user prompt
printf("\n It is now %d:", hour);
printf("%02dam", minute);
printf(", what do you wish to do? ");
}